/*
 *	WARN  :  THIS FRONTEND CODE IS AUTO GENERATE, ALL RIGHTS RESERVED.
 *	AUTHOR:  ZhaoChunPing
 *	EMAIL :  forxy@126.com
 *	DATE  :  2022.1
 */

#include <stdint.h>
#include "pkcs11.h"
#include "session.h"
#include "auto_cmd.h"

pkcs11fun g_function[256];

extern void C_LoginUser_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_Logout_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_EncryptInit_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_EncryptUpdate_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_EncryptFinal_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_Encrypt_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_DecryptInit_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_DecryptUpdate_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_DecryptFinal_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_Decrypt_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_DigestInit_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_DigestUpdate_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_DigestFinal_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_Digest_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_Sign_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_Verify_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_GenerateRandom_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_GenerateKey_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_GenerateKeyPair_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_CreateObject_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_DestroyObject_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_FindObjectsInit_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_FindObjects_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_FindObjectsFinal_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_GetAttributeValue_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_SetAttributeValue_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_WrapKey_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);
extern void C_UnwrapKey_backend(void *ctx, uint8_t *in, int inlen, uint8_t *out, int *outlen);

void	function_talble_init()
{	g_function[CMD_C_LoginUser] = C_LoginUser_backend;
	g_function[CMD_C_Logout] = C_Logout_backend;
	g_function[CMD_C_EncryptInit] = C_EncryptInit_backend;
	g_function[CMD_C_EncryptUpdate] = C_EncryptUpdate_backend;
	g_function[CMD_C_EncryptFinal] = C_EncryptFinal_backend;
	g_function[CMD_C_Encrypt] = C_Encrypt_backend;
	g_function[CMD_C_DecryptInit] = C_DecryptInit_backend;
	g_function[CMD_C_DecryptUpdate] = C_DecryptUpdate_backend;
	g_function[CMD_C_DecryptFinal] = C_DecryptFinal_backend;
	g_function[CMD_C_Decrypt] = C_Decrypt_backend;
	g_function[CMD_C_DigestInit] = C_DigestInit_backend;
	g_function[CMD_C_DigestUpdate] = C_DigestUpdate_backend;
	g_function[CMD_C_DigestFinal] = C_DigestFinal_backend;
	g_function[CMD_C_Digest] = C_Digest_backend;
	g_function[CMD_C_Sign] = C_Sign_backend;
	g_function[CMD_C_Verify] = C_Verify_backend;
	g_function[CMD_C_GenerateRandom] = C_GenerateRandom_backend;
	g_function[CMD_C_GenerateKey] = C_GenerateKey_backend;
	g_function[CMD_C_GenerateKeyPair] = C_GenerateKeyPair_backend;
	g_function[CMD_C_CreateObject] = C_CreateObject_backend;
	g_function[CMD_C_DestroyObject] = C_DestroyObject_backend;
	g_function[CMD_C_FindObjectsInit] = C_FindObjectsInit_backend;
	g_function[CMD_C_FindObjects] = C_FindObjects_backend;
	g_function[CMD_C_FindObjectsFinal] = C_FindObjectsFinal_backend;
	g_function[CMD_C_GetAttributeValue] = C_GetAttributeValue_backend;
	g_function[CMD_C_SetAttributeValue] = C_SetAttributeValue_backend;
	g_function[CMD_C_WrapKey] = C_WrapKey_backend;
	g_function[CMD_C_UnwrapKey] = C_UnwrapKey_backend;
}